#pragma once

#include <vector>
#include <filesystem>

#include <SFML/Graphics/Image.hpp>

class ImageRemover final
{
public:
  ImageRemover() noexcept;
  ImageRemover(std::size_t max_image_width, std::size_t max_image_height) noexcept;

  ImageRemover(const ImageRemover&) = delete;
  ImageRemover(ImageRemover&&) = delete;
  ImageRemover& operator=(const ImageRemover&) = delete;
  ImageRemover& operator=(ImageRemover&&) = delete;

  void start_removing(const std::vector<std::filesystem::path>& images_to_remove);

  inline std::size_t max_image_width() const noexcept
  { return max_image_width_; }

  inline std::size_t max_image_height() const noexcept
  { return max_image_height_; }

  inline void set_max_image_width(std::size_t max_image_width) noexcept
  { max_image_width_ = max_image_width; }

  inline void set_max_image_height(std::size_t max_image_height) noexcept
  { max_image_height_ = max_image_height; }

private:
  std::size_t max_image_width_;
  std::size_t max_image_height_;

  bool need_to_remove(const sf::Image& img) noexcept;
};
